{{#* inline 'getLogic' container item toolbar}}
{{#if container.psAppViewLogics}}
	{{#each container.psAppViewLogics as | logic |}}
		{{#and logic.psViewCtrlName (eq logic.psViewCtrlName toolbar.name) (eq logic.logicType 'APPVIEWUIACTION') logic.psAppViewUIAction}}
			{{#eq logic.name (concat toolbar.name '_' item.name '_click')}}
logic: {
	name: '{{logic.name}}',
	actionTag: '{{#if logic.psAppViewUIAction.psUIAction}}{{logic.psAppViewUIAction.psUIAction.uIActionTag}}{{/if}}',
	xDataCtrlName: '{{logic.psAppViewUIAction.xDataControlName}}',
	{{#and logic.psAppViewUIAction.psUIAction logic.psAppViewUIAction.psUIAction.psAppDataEntity}}
	actionDECodeName: '{{logic.psAppViewUIAction.psUIAction.psAppDataEntity.codeName}}',
	{{/and}}
	predefinedType: '{{#if logic.psAppViewUIAction.psUIAction}}{{logic.psAppViewUIAction.psUIAction.predefinedType}}{{/if}}'
}
			{{/eq}}
		{{/and}}
	{{/each}}
{{/if}}
{{/inline}}
{{#each items as | item |}}
  {
  {{#eq item.itemType 'SEPERATOR'}}
		name: '{{name}}',
		itemType: 'SEPERATOR',
  {{else}}
		actionLevel: '{{actionLevel}}',
		caption: '{{caption}}',
		captionLanResTag: '{{capPSLanguageRes.lanResTag}}',
		name: '{{name}}',
		showCaption: {{showCaption}},
		tooltip: '{{tooltip}}',
		tooltipLanResTag: '{{tooltipPSLanguageRes.lanResTag}}',
		itemType: '{{itemType}}',
		showIcon: {{#if showIcon}}{{showIcon}}{{else}}false{{/if}},
		disabled: false,
		{{#if item.psSysPFPlugin}}
		pluginCode: '{{item.psSysPFPlugin.pluginCode}}',
		{{/if}}
    {{#eq itemType 'ITEMS'}}
    visible: true,
      {{#if psSysCss}}
		cssName: '{{psSysCss.cssName}}',
			{{/if}}
			{{#if psSysImage}}
		imagePath: '{{psSysImage.imagePath}}',
		iconCls: '{{psSysImage.cssClass}}',
			{{/if}}
		dataAccessAction: '',
		items: [{{> @macro/widgets/toolbar/toolbar-item.hbs items=psDEToolbarItems view=view toolbar=toolbar}}]
		{{else}}
			{{#if psUIAction}}
		cssName: '{{psSysCss.cssName}}{{#if psUIAction.psSysCss}} {{psUIAction.psSysCss}}{{/if}}',
				{{#if psSysImage}}
		imagePath: '{{psSysImage.imagePath}}',
		iconCls: '{{psSysImage.cssClass}}',
				{{else if psUIAction.psSysImage}}
		imagePath: '{{psUIAction.psSysImage.imagePath}}',
		iconCls: '{{psUIAction.psSysImage.cssClass}}',
				{{/if}}
		dataAccessAction: '{{psUIAction.dataAccessAction}}',
		noPrivDisplayMode: {{psUIAction.noPrivDisplayMode}},
		uiAction: {
			codeName: '{{psUIAction.codeName}}',
			uIActionMode: '{{psUIAction.uIActionMode}}',
			actionTarget: '{{psUIAction.actionTarget}}',
			uIActionTag: '{{psUIAction.uIActionTag}}',
			uIActionType: '{{psUIAction.uIActionType}}'
		},
				{{#and view.psViewLayoutPanel (eq view.psViewLayoutPanel.useDefaultLayout false) view.psViewLayoutPanel.viewProxyMode}}
			{{> getLogic container=view.psViewLayoutPanel item=item toolbar=toolbar}}
				{{else}}
			{{> getLogic container=view item=item toolbar=toolbar}}
				{{/and}}
				
			{{else}}
				{{#if psSysImage}}
		imagePath: '{{psSysImage.imagePath}}',
		iconCls: '{{psSysImage.cssClass}}',
				{{/if}}
		cssName: '{{psSysCss.cssName}}'
			{{/if}}
		{{/eq}}
  {{/eq}}
  },
{{/each}}